// import axios from '@/config/httpConfig'
import http from './base'

const gankDataApiPrefix = 'https://gank.io/api/v2/'

// 获取天气信息
export const getWeatherInfo = (params) => {
  return http.fetchGet(`https://www.tianqiapi.com/free/day?appid=39281454&appsecret=AOcFC9wU &cityid=${params}&vue=1`, null)
}

/****************************************** 干货集中营 ********************************/
// https://gank.io/api
// 首页banner轮播
export const getHomePageBanner = (params) => {
  console.log('gankDataApiPrefix:::' + gankDataApiPrefix)
  return http.fetchGet(gankDataApiPrefix + 'banners', params)
}

// 妹纸列表
export const getGirlList = (page, params) => {
  return http.fetchGet(gankDataApiPrefix + 'data/category/Girl/type/Girl/page/' + page.page + '/count/10', params)
}

// 文章详情
export const getArticleDetails = (id, params) => {
  return http.fetchGet(gankDataApiPrefix + 'post/' + id, params)
}

// 获取类型列表数据
// https://gank.io/api/v2/data/category/Girl/type/Girl/page/1/count/10
export const getGankTypeList = (item, params) => {
  return http.fetchGet(gankDataApiPrefix + 'data/category/' + item.bigType + '/type/' + item.type + '/page/' + item.page + '/count/10', params)
}
/****************************************** 用户接口 ********************************/

